package com.sq.partner.manager.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.sq.partner.manager.dao.INlifeCoreProdRiskDao;
import com.sq.partner.manager.mybatis.model.NlifeCoreProdRisk;

@Repository
public class NlifeCoreProdRiskDaoImpl extends BaseDaoImpl implements
		INlifeCoreProdRiskDao {

	@Override
	public void insertCoreProdRisks(List<NlifeCoreProdRisk> list)
			throws Exception {
		this.batchInsert("insertNlifeCoreProdRisk", list);	
		
	}

	@Override
	public NlifeCoreProdRisk queryByProdRisk(String coreProdCode,
			String coreRiskCode) throws Exception {
		Map<String, String> map = new HashMap<String, String>();
		map.put("coreProdCode", coreProdCode);
		map.put("coreRiskCode", coreRiskCode);
		NlifeCoreProdRisk nlifeCoreProdRisk = (NlifeCoreProdRisk)this.query("queryNlifeCoreProdRiskByMap",map);

		return nlifeCoreProdRisk;
	}
}
